﻿@namespace Masa.Blazor
@inherits MasaComponentBase

<span class="@GetClass()"
      style="@GetStyle()"
      id="@Id"
      @attributes="@Attributes"
      @ref="@Ref">
    @if (_value is not null)
    {
        @_value
    }
    else
    {
        foreach (var (text, placeholderIndex) in _segments)
        {
            if (placeholderIndex != -1 && PlaceholderContent is not null)
            {
                @PlaceholderContent(placeholderIndex)
            }
            else
            {
                @text
            }
        }
    }
</span>